import VueRouter from 'vue-router'
//引入组件
import Index from '../pages'
import Home from '../pages/home/home'
import Login from '../pages/login/login'
import Register from '../pages/register/register'
import Center from '../pages/center/center'
import Storeup from '../pages/storeup/list'
import News from '../pages/news/news-list'
import NewsDetail from '../pages/news/news-detail'
import payList from '../pages/pay'

import zuhuList from '../pages/zuhu/list'
import zuhuDetail from '../pages/zuhu/detail'
import zuhuAdd from '../pages/zuhu/add'
import fangdongList from '../pages/fangdong/list'
import fangdongDetail from '../pages/fangdong/detail'
import fangdongAdd from '../pages/fangdong/add'
import fangwuleixingList from '../pages/fangwuleixing/list'
import fangwuleixingDetail from '../pages/fangwuleixing/detail'
import fangwuleixingAdd from '../pages/fangwuleixing/add'
import fangwuxinxiList from '../pages/fangwuxinxi/list'
import fangwuxinxiDetail from '../pages/fangwuxinxi/detail'
import fangwuxinxiAdd from '../pages/fangwuxinxi/add'
import kanfangyuyueList from '../pages/kanfangyuyue/list'
import kanfangyuyueDetail from '../pages/kanfangyuyue/detail'
import kanfangyuyueAdd from '../pages/kanfangyuyue/add'
import zulindingdanList from '../pages/zulindingdan/list'
import zulindingdanDetail from '../pages/zulindingdan/detail'
import zulindingdanAdd from '../pages/zulindingdan/add'
import hetongxinxiList from '../pages/hetongxinxi/list'
import hetongxinxiDetail from '../pages/hetongxinxi/detail'
import hetongxinxiAdd from '../pages/hetongxinxi/add'
import zulintuidingList from '../pages/zulintuiding/list'
import zulintuidingDetail from '../pages/zulintuiding/detail'
import zulintuidingAdd from '../pages/zulintuiding/add'
import shangchuanhetongList from '../pages/shangchuanhetong/list'
import shangchuanhetongDetail from '../pages/shangchuanhetong/detail'
import shangchuanhetongAdd from '../pages/shangchuanhetong/add'
import hetongqiandingList from '../pages/hetongqianding/list'
import hetongqiandingDetail from '../pages/hetongqianding/detail'
import hetongqiandingAdd from '../pages/hetongqianding/add'
import hetongjiufenList from '../pages/hetongjiufen/list'
import hetongjiufenDetail from '../pages/hetongjiufen/detail'
import hetongjiufenAdd from '../pages/hetongjiufen/add'
import jiufenchuliList from '../pages/jiufenchuli/list'
import jiufenchuliDetail from '../pages/jiufenchuli/detail'
import jiufenchuliAdd from '../pages/jiufenchuli/add'
import shouzutixingList from '../pages/shouzutixing/list'
import shouzutixingDetail from '../pages/shouzutixing/detail'
import shouzutixingAdd from '../pages/shouzutixing/add'
import weixiushenqingList from '../pages/weixiushenqing/list'
import weixiushenqingDetail from '../pages/weixiushenqing/detail'
import weixiushenqingAdd from '../pages/weixiushenqing/add'
import weixiuchuliList from '../pages/weixiuchuli/list'
import weixiuchuliDetail from '../pages/weixiuchuli/detail'
import weixiuchuliAdd from '../pages/weixiuchuli/add'
import weixiufankuiList from '../pages/weixiufankui/list'
import weixiufankuiDetail from '../pages/weixiufankui/detail'
import weixiufankuiAdd from '../pages/weixiufankui/add'
import tousuxinxiList from '../pages/tousuxinxi/list'
import tousuxinxiDetail from '../pages/tousuxinxi/detail'
import tousuxinxiAdd from '../pages/tousuxinxi/add'
import yajinxinxiList from '../pages/yajinxinxi/list'
import yajinxinxiDetail from '../pages/yajinxinxi/detail'
import yajinxinxiAdd from '../pages/yajinxinxi/add'
import newstypeList from '../pages/newstype/list'
import newstypeDetail from '../pages/newstype/detail'
import newstypeAdd from '../pages/newstype/add'
import aboutusList from '../pages/aboutus/list'
import aboutusDetail from '../pages/aboutus/detail'
import aboutusAdd from '../pages/aboutus/add'
import systemintroList from '../pages/systemintro/list'
import systemintroDetail from '../pages/systemintro/detail'
import systemintroAdd from '../pages/systemintro/add'
import discussfangwuxinxiList from '../pages/discussfangwuxinxi/list'
import discussfangwuxinxiDetail from '../pages/discussfangwuxinxi/detail'
import discussfangwuxinxiAdd from '../pages/discussfangwuxinxi/add'

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}

//配置路由
export default new VueRouter({
	routes:[
		{
      path: '/',
      redirect: '/index/home'
    },
		{
			path: '/index',
			component: Index,
			children:[
				{
					path: 'home',
					component: Home
				},
				{
					path: 'center',
					component: Center,
				},
				{
					path: 'pay',
					component: payList,
				},
				{
					path: 'storeup',
					component: Storeup
				},
				{
					path: 'news',
					component: News
				},
				{
					path: 'newsDetail',
					component: NewsDetail
				},
				{
					path: 'zuhu',
					component: zuhuList
				},
				{
					path: 'zuhuDetail',
					component: zuhuDetail
				},
				{
					path: 'zuhuAdd',
					component: zuhuAdd
				},
				{
					path: 'fangdong',
					component: fangdongList
				},
				{
					path: 'fangdongDetail',
					component: fangdongDetail
				},
				{
					path: 'fangdongAdd',
					component: fangdongAdd
				},
				{
					path: 'fangwuleixing',
					component: fangwuleixingList
				},
				{
					path: 'fangwuleixingDetail',
					component: fangwuleixingDetail
				},
				{
					path: 'fangwuleixingAdd',
					component: fangwuleixingAdd
				},
				{
					path: 'fangwuxinxi',
					component: fangwuxinxiList
				},
				{
					path: 'fangwuxinxiDetail',
					component: fangwuxinxiDetail
				},
				{
					path: 'fangwuxinxiAdd',
					component: fangwuxinxiAdd
				},
				{
					path: 'kanfangyuyue',
					component: kanfangyuyueList
				},
				{
					path: 'kanfangyuyueDetail',
					component: kanfangyuyueDetail
				},
				{
					path: 'kanfangyuyueAdd',
					component: kanfangyuyueAdd
				},
				{
					path: 'zulindingdan',
					component: zulindingdanList
				},
				{
					path: 'zulindingdanDetail',
					component: zulindingdanDetail
				},
				{
					path: 'zulindingdanAdd',
					component: zulindingdanAdd
				},
				{
					path: 'hetongxinxi',
					component: hetongxinxiList
				},
				{
					path: 'hetongxinxiDetail',
					component: hetongxinxiDetail
				},
				{
					path: 'hetongxinxiAdd',
					component: hetongxinxiAdd
				},
				{
					path: 'zulintuiding',
					component: zulintuidingList
				},
				{
					path: 'zulintuidingDetail',
					component: zulintuidingDetail
				},
				{
					path: 'zulintuidingAdd',
					component: zulintuidingAdd
				},
				{
					path: 'shangchuanhetong',
					component: shangchuanhetongList
				},
				{
					path: 'shangchuanhetongDetail',
					component: shangchuanhetongDetail
				},
				{
					path: 'shangchuanhetongAdd',
					component: shangchuanhetongAdd
				},
				{
					path: 'hetongqianding',
					component: hetongqiandingList
				},
				{
					path: 'hetongqiandingDetail',
					component: hetongqiandingDetail
				},
				{
					path: 'hetongqiandingAdd',
					component: hetongqiandingAdd
				},
				{
					path: 'hetongjiufen',
					component: hetongjiufenList
				},
				{
					path: 'hetongjiufenDetail',
					component: hetongjiufenDetail
				},
				{
					path: 'hetongjiufenAdd',
					component: hetongjiufenAdd
				},
				{
					path: 'jiufenchuli',
					component: jiufenchuliList
				},
				{
					path: 'jiufenchuliDetail',
					component: jiufenchuliDetail
				},
				{
					path: 'jiufenchuliAdd',
					component: jiufenchuliAdd
				},
				{
					path: 'shouzutixing',
					component: shouzutixingList
				},
				{
					path: 'shouzutixingDetail',
					component: shouzutixingDetail
				},
				{
					path: 'shouzutixingAdd',
					component: shouzutixingAdd
				},
				{
					path: 'weixiushenqing',
					component: weixiushenqingList
				},
				{
					path: 'weixiushenqingDetail',
					component: weixiushenqingDetail
				},
				{
					path: 'weixiushenqingAdd',
					component: weixiushenqingAdd
				},
				{
					path: 'weixiuchuli',
					component: weixiuchuliList
				},
				{
					path: 'weixiuchuliDetail',
					component: weixiuchuliDetail
				},
				{
					path: 'weixiuchuliAdd',
					component: weixiuchuliAdd
				},
				{
					path: 'weixiufankui',
					component: weixiufankuiList
				},
				{
					path: 'weixiufankuiDetail',
					component: weixiufankuiDetail
				},
				{
					path: 'weixiufankuiAdd',
					component: weixiufankuiAdd
				},
				{
					path: 'tousuxinxi',
					component: tousuxinxiList
				},
				{
					path: 'tousuxinxiDetail',
					component: tousuxinxiDetail
				},
				{
					path: 'tousuxinxiAdd',
					component: tousuxinxiAdd
				},
				{
					path: 'yajinxinxi',
					component: yajinxinxiList
				},
				{
					path: 'yajinxinxiDetail',
					component: yajinxinxiDetail
				},
				{
					path: 'yajinxinxiAdd',
					component: yajinxinxiAdd
				},
				{
					path: 'newstype',
					component: newstypeList
				},
				{
					path: 'newstypeDetail',
					component: newstypeDetail
				},
				{
					path: 'newstypeAdd',
					component: newstypeAdd
				},
				{
					path: 'aboutus',
					component: aboutusList
				},
				{
					path: 'aboutusDetail',
					component: aboutusDetail
				},
				{
					path: 'aboutusAdd',
					component: aboutusAdd
				},
				{
					path: 'systemintro',
					component: systemintroList
				},
				{
					path: 'systemintroDetail',
					component: systemintroDetail
				},
				{
					path: 'systemintroAdd',
					component: systemintroAdd
				},
				{
					path: 'discussfangwuxinxi',
					component: discussfangwuxinxiList
				},
				{
					path: 'discussfangwuxinxiDetail',
					component: discussfangwuxinxiDetail
				},
				{
					path: 'discussfangwuxinxiAdd',
					component: discussfangwuxinxiAdd
				},
			]
		},
		{
			path: '/login',
			component: Login
		},
		{
			path: '/register',
			component: Register
		},
	]
})
